import pytest
import requests
#列表中嵌套字典
testdata=[{'logging.conf':'liangchen'},{'2':'liangyi'},{'logging.conf':'wangjing'}]
#列表中嵌套列表
testdata2=[[1,2,3],[4,5,6],[7,8,9]]
#列表中嵌套元祖
testdat3=[(1,2,3),(4,5,6),(7,8,9)]

@pytest.fixture(params=testdata2)
def class_scope(request):
    return request.param

def test_case1(class_scope):
    #省去了for循环,for循环的操作交给fixture来做
    print(class_scope)

if __name__ == '__main__':
    pytest.main(['-vs','自己瞎写参数化.py'])